<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>uni_app中全局方法和this</title>
  <!-- 
    得要先引入 import { getCurrentInstance } from "vue"

    const self = getCurrentInstance().ctx
  -->
  <!--  
    使用全局方法
    const global = getCurrentInstance()?.appContext?.config?.globalProperties

    global.$http.get("/api/public/v1/home/swiperdata").then(res => {
	    console.log(res)
	  })
  -->
  <style>
    *,
    *::after,
    *::before {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    :root {
      min-height: 100vh;
    }

    :root:focus-within {
      scroll-behavior: smooth;
    }

    body {
      min-height: inherit;
    }
  </style>
</head>

<body>
  <div></div>
</body>
<script>
  "use strict"; {
  };
</script>

</html>